﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Layouts/Form.Master" CodeBehind="FunctionEdit.aspx.cs" Inherits="Bingosoft.WebApp.Modules.SecurityConsole.Privilege.FunctionEdit" %>

<asp:Content ContentPlaceHolderID="head" ID="idFormTitle" runat="server">
    <title><%=Request["title"]%></title>
</asp:Content>
<asp:Content ContentPlaceHolderID="Content" ID="idFormMain" runat="server">
    <!-- 页面头部 -->
	<div class="header">
	    <h1><%=Request["title"]%></h1>
	</div>

    <web:SmartFormView ID="SmartFormView1" runat="server" DataKeyNames="Id" DataSourceID="SmartDataSource1"
        Width="100%">        
        <InsertItemTemplate></InsertItemTemplate>
        <EditItemTemplate></EditItemTemplate>
        <ItemTemplate>
            <asp:HiddenField ID='Id' runat='server' value='<%# Bind("Id") %>' />
            <asp:HiddenField ID='Parent' runat='server' Value='<%# Bind("Parent") %>' />
          <div>
            <table cellpadding='2' cellspacing='1' width='100%' class="formitem">
            <caption>所属模块：(<%=Request.Params["ParentName"] %>)</caption>
                <tr>
                    <th>                        
                        功能名称:<font color='red'>*</font>
                    </th>
                    <td>
                        <asp:TextBox ID="Name" runat="server" Text='<%# Bind("Name") %>'  Width='90%' 
                        validator="required,length[1,150]"></asp:TextBox>                        
                    </td>
                </tr>
                <tr>
                    <th>
                        功能代码:<font color='red'>*<ont>
                    </th>
                    <td>
                        <asp:TextBox ID='Code' runat='server' Text='<%# Bind("Code") %>' Width='90%'
                            validator="required,length[1,50]"></asp:TextBox>
                    </td>
                </tr>  
                <tr>
                    <th>
                        页面URL:<font color='red'>*<ont>
                    </th>
                    <td>
                        <asp:TextBox ID='Url' runat='server' Text='<%# Bind("Url") %>' Width='90%' validator="required,length[1,300]"
                            ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        功能描述:
                    </th>
                    <td>              
                       <asp:TextBox TextMode="MultiLine" Rows="5" Columns="45" ID='Description' runat='server' Text='<%# Bind("Description") %>' Width='90%' validator="length[1,1000]"></asp:TextBox>                                                                
                    </td>
                </tr>                      
            </table>
        </div>
        </ItemTemplate>
    </web:SmartFormView>
    
    <web:SmartSqlDataSource ID="SmartDataSource1" runat="server" SelectCommand="privilege.function.select"
    InsertCommand="privilege.function.insert" UpdateCommand="privilege.function.update"
     SelectCommandAutoPageWrap="false">
    </web:SmartSqlDataSource>

    <!-- 页脚区域 -->
	<div class="footer">
		<asp:Button runat="server" Text="确定" 
            OnClientClick="return validateForm();" onclick="SaveFunction"/>        
        <asp:Button ID="CloseButton" runat="server" Text="关闭" OnClientClick="return closeForm();" />        
	</div>
</asp:Content>
